package com.jwds.digital.bios.business.core.utils;

import cn.hutool.core.lang.Snowflake;
import cn.hutool.core.util.IdUtil;
import java.math.BigDecimal;
import org.apache.commons.math3.analysis.function.Power;

/**
 * <p>BeltCloudUtil</p>
 *
 * @author 林柏云
 * @Date：2024/12/5 16:00
 */
public class BeltCloudUtil {


  /** 电流的英文名称 **/
  public static String ELECTRIC_ENG_NAME = "ELECTRIC_ENG_NAME";
  /** 电压的英文名称 **/
  public static String VOLTAGE_ENG_NAME = "VOLTAGE_ENG_NAME";
  /** 功率的英文名称 **/
  public static String POWER_ENG_NAME = "POWER_ENG_NAME";
  /** 功率因数的英文名称 **/
  public static String POWER_FACTOR_ENG_NAME = "POWER_FACTOR_ENG_NAME";
  /** 功率因数的英文名称 **/
  public static String KWH_FACTOR_ENG_NAME = "KWH_FACTOR_ENG_NAME";

  /** 尖 **/
  public static int SPIKE_POWER = 1;

  /** 峰 **/
  public static int PEAK_POWER = 2;

  /** 平 **/
  public static int FLAT_POWER = 3;

  /** 谷 **/
  public static int VALLEY_POWER = 4;

  /** 能效评分优秀平均分值 **/
  public static BigDecimal ENERGY_EFFICIENCY_EXCELLENT = BigDecimal.valueOf(7.5);

  /** 能效评分良好平均分值 **/
  public static BigDecimal ENERGY_EFFICIENCY_MEDIUM = BigDecimal.valueOf(5);


  /**
   * 直接获取雪花算法的ID
   * @return
   */
  public static long getSnowflakeId() {
    Snowflake snowflake = IdUtil.createSnowflake(1,1);
    return snowflake.nextId();
  }
}
